#! /usr/bin/python

nlist = [0 for i in range(10**6)]

for y in range(2, 10**6):
    end = (10**6 + y**2)/(4*y)
    if end > y: end = y
    else: 
	end += 1
	#print end, y
    for d in range(y/4+1, end):
	n = 4*d*y - y**2
	#if n > 10**6: print n, y, d
	if n >= 10**6: break
	nlist[n] += 1
	#if n == 1155: print y, d
   

print nlist[27], nlist[1155]

print nlist.count(0)

